package com.qzsoft.zhjd.server.modules.ludong.cement.service.impl;

import com.qzsoft.zhjd.server.modules.ludong.cement.service.CementStabilizedMacadamCollectionService;
import com.qzsoft.zhjd.server.modules.ludong.cement.entity.CementStabilizedMacadamCollectionEntity;
import com.qzsoft.zhjd.server.modules.ludong.cement.mapper.CementStabilizedMacadamCollectionMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service("cementStabilizedMacadamCollectionService")
public class CementStabilizedMacadamCollectionServiceImpl extends ServiceImpl<CementStabilizedMacadamCollectionMapper, CementStabilizedMacadamCollectionEntity> implements CementStabilizedMacadamCollectionService {


    /**
     * 功能描述: 先删除后添加
     * @param entity 实体类
     * @return : void
     * @author : liugf
     * @date : 2020/6/10 20:25
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insertAndRemoveData(CementStabilizedMacadamCollectionEntity entity) {
        removeById(entity.getId());
        save(entity);
    }

}
